package cn.itcast.order;

public class JsonParse {
    private static JsonParse instance;
    private JsonParse() {

    }
    public static JsonParse getInstance() {
        if (instance==null) {
            instance=new JsonParse();
        }
        return instance;
    }
    public List<ShopBean> getShopList(String json) {
        Gson gson=new Gson();
        Type listType=new TypeToken<List<ShopBean>>() {

        }.getType();
        List<ShopBean> shopList=gson.fromJson(json, listType);
        return shopList;
    }
}
